The present invention relates to an apparatus for controlling a motor.
JP-A-2002-32127 discloses the electronic cam function.
In the method disclosed in JP-A-2002-32127, operation patterns for normal rotation and reverse rotation are provided in a motor controller and the operation pattern is read out in synchronism with a clock signal to control the position of the cam so that the electronic cam function is provided. In the method, in order to operate the cam in accordance with the operation pattern by a motor smoothly, it is necessary to speed up the clock signal and provide the operation pattern in detail. Accordingly, it is required to increase the processing speed of the clock signal and increase a memory capacity for storing the operation pattern, so that restriction is imposed on cost, size and so on.